<h1>News creation</h1>

<form action="{{ path('news_create') }}" method="post" {{ form_enctype(form) }}>
    
    <table>
      <tr>
        <td>{{ form_label(form.categoryId) }}</td>
        <td>
                {{ form_errors(form.categoryId) }}
                {{ form_widget(form.categoryId) }}
        </td>      
      </tr>
      <tr>
        <td>{{ form_label(form.newsTitle) }}</td>
        <td>
                {{ form_errors(form.newsTitle) }}
                {{ form_widget(form.newsTitle) }}
          </td>      
        </tr>
      <tr>
        <td>{{ form_label(form.newsBody) }}</td>
        <td>
              {{ form_errors(form.newsBody) }}
              {{ form_widget(form.newsBody) }}
          </td>      
      </tr>
      <tr>
        <td>{{ form_label(form.imgThumb) }}</td>
        <td>
            {{ form_errors(form.imgThumb) }}
            {{ form_widget(form.imgThumb) }}
          </td>      
      </tr>

      <tr>
        <td>{{ form_label(form.imgLarge) }}</td>
        <td>
            {{ form_errors(form.imgLarge) }}
            {{ form_widget(form.imgLarge) }}
          </td>      
      </tr>
      <tr>
        <td>{{ form_label(form.isSpecial) }}</td>
        <td>
            {{ form_errors(form.isSpecial) }}
            {{ form_widget(form.isSpecial) }}
          </td>      
      </tr>
      <tr>
        <td>{{ form_label(form.isActive) }}</td>
        <td>
            {{ form_errors(form.isActive) }}
            {{ form_widget(form.isActive) }}
          </td>      
      </tr>
      <tr>
        <td>{{ form_label(form.targetDate) }}</td>
        <td>
            {{ form_errors(form.targetDate) }}
            {{ form_widget(form.targetDate) }}
          </td>      
      </tr>
    </table>
    {{ form_widget(form._token) }}
    <p>
        <button type="submit">Create</button>
    </p>
</form>

<ul class="record_actions">
    <li>
        <a href="{{ path('news') }}">
            Back to the list
        </a>
    </li>
</ul>
